﻿<?php
$request=Zend_Controller_Front::getInstance()->getRequest();
$auth = Zend_Auth::getInstance();
$server=$request->getServer('SERVER_NAME');
$port='80';


$this->headMeta()->appendName('keywords', 'viriathus,telvent,datacenters,circuitos,mmr');
$this->headMeta()->appendName('author', 'Juan Manuel Martínez Carrillo');
$this->headMeta()->appendName('description', 'Sistema de Gestión de Infraestructuras Tecnológicas ');
$this->headMeta()->appendHttpEquiv('Content-Type', 'text/html; charset=utf-8');
$this->headMeta()->appendHttpEquiv('Robots', 'No-Index,No-Follow');

$this->headLink()->headLink(array('rel' => 'favicon', 'href' => '/favicon.ico'));







$this->headLink()->appendStylesheet("http://$server:$port/css/reset.css");
$this->headLink()->appendStylesheet("http://$server:$port/css/typography.css");
$this->headLink()->appendStylesheet("http://$server:$port/css/zend.css");
$this->headLink()->appendStylesheet("http://$server:$port/css/cupertino/jquery-ui-1.8.4.custom.css");
$this->headLink()->appendStylesheet("http://$server:$port/css/layout_print.css",'print');
$this->headLink()->appendStylesheet("http://$server:$port/css/jquery.ibutton.min.css");

$this->headScript()->offsetSetFile(10,"http://$server:$port/js/jquery-1.8.0.min.js",'text/javascript');
$this->headScript()->offsetSetFile(20,"http://$server:$port/js/jquery-ui-1.8.23.custom.min.js",'text/javascript');
$this->headScript()->offsetSetFile(30,"http://$server:$port/js/jquery.i18n.min.js",'text/javascript');
$this->headScript()->offsetSetFile(35,"http://$server:$port/js/jquery.form.js",'text/javascript');
$this->headScript()->offsetSetFile(50,"http://$server:$port/js/jquery.tablesorter.js",'text/javascript');
$this->headScript()->offsetSetFile(55,"http://$server:$port/js/jquery.taconitejson.js",'text/javascript');

$this->headScript()->offsetSetFile(60,"http://$server:$port/js/noty/noty.js",'text/javascript');
$this->headScript()->offsetSetFile(61,"http://$server:$port/js/noty/layouts/top.js",'text/javascript');
$this->headScript()->offsetSetFile(62,"http://$server:$port/js/noty/layouts/bottomRight.js",'text/javascript');
$this->headScript()->offsetSetFile(63,"http://$server:$port/js/noty/themes/default.js",'text/javascript');

$this->headScript()->offsetSetScript(100,$this->render('js_dinamic.js'));
$this->headScript()->offsetSetFile(110,"http://$server:$port/js/zend.js",'text/javascript');
$this->headScript()->offsetSetFile(120,"http://$server:$port/js/jquery.tablesorter.widgets.js",'text/javascript');

$this->headScript()->offsetSetFile(130,"http://$server:$port/js/jquery.ibutton.js",'text/javascript');
$this->headScript()->offsetSetScript(150,
    "$(document).ready(function(){\n".$this->placeholder('onReady')."\n})\n"
);



?>
<html>
<head>
<!--wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww
// Autor Juan Manuel Martínez Carrillo
// juamarca@gmail.com
// 2008-2012
// Viriathus
// Sistema de Gestión de Infraestructuras Tecnológicas 
// Telvent Global Services
//wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww--> 
<?php
echo $this->headMeta().PHP_EOL;
echo $this->headTitle().PHP_EOL;
echo $this->headLink().PHP_EOL;
echo $this->headScript().PHP_EOL;
echo $this->headStyle().PHP_EOL;
?>

</head>
<body onload="testload()" id="<?=$this->controllerName?>_<?=$this->actionName?>">
	
<?if($auth->getIdentity() && !$auth->getIdentity()->mail):?>
<script>

    $.get('/usuario/personal',function(data){
     			$('#dialog').html(data).dialog({buttons: {'Guardar':function(){$("form#ajax_form").submit()}}}).dialog('open')
    });
    
</script>

<?endif;?>
    
    <!--Barra superior-->
    <div id="header">
    	<div id="logohead"></div>
    	<div id="layoutdims">
                <p id="breadcrumbs">
                   <span> <?php 
                   if($this->navigation()->breadcrumbs()->render()){
                    echo $this->navigation()->breadcrumbs()->render();
                   }else{
                    echo '<a href="/index">Home</a>';
                   }
                    ?></span>
                   <span id="select_dc"><?php echo $this->formchangeDC;?></span>
                </p>
    	</div>
    </div>
    <!--Fin Barra superior-->

    <div class="colmask fullpage">
        <div class="col1 ">
            <!-- Column 1 start -->
            <div class="noprint">
            <?php if($this->filtros) echo $this->filtros;?>
            </div>
            <div class="ui-helper-clearfix"></div>
    
            <?php  echo $this->layout()->content;?>
            <div style="height:50px"></div>
            <!-- Column 1 end -->
        </div>
    </div>



    <div id="cometchat_base" class="ui-widget-header" >
        <?if($auth->hasIdentity()):?>
        
        <span class="cometchat_tab cometchat_tab_asuntos">
            <a>
              <span class="ui-icon ui-icon-calendar"></span>
              <span><?php echo $this->translate('Mis Tareas');?></span>
            </a>
        </span>
        
        <span class="cometchat_tab cometchat_tab_mail">
             <a href="/mail/" class="comet_mail">
              <span class="ui-icon ui-icon-mail-closed"></span>
              <span><?php echo $this->translate('Mail');?></span>
            </a>
        </span>
        
        <span class="cometchat_tab cometchat_tab_favoritos">
            <a>
              <span class="ui-icon ui-icon-calendar"></span>
              <span><?php echo $this->translate('Bookmarks');?></span>
            </a>
        </span>

        <span class="cometchat_tab cometchat_tab_time">
              <a>
              <span class="ui-icon ui-icon-clock"></span>
              <span id="tiempo_carga"><?php echo $this->timeServer?></span>
              </a>
        </span>
    
        <span class="cometchat_tab cometchat_tab_user">
            <a href="#" class="select_change_personal">
                <span class="ui-icon ui-icon-person"></span>
                <span><?php echo substr($this->escape($auth->getIdentity()->nombre),0,28);?></span>
            </a>
        </span>
        
        <span class="cometchat_tab cometchat_tab_acceso">
            <a href="#" rel="<?php echo $this->controllerName?>:<?php echo $this->idZona?>" class="verAccesos">
                <span class="ui-icon ui-icon-key"></span>
                <span><?php echo $this->translate('Accesos');?></span>
            </a>
        </span>
        
        <span class="cometchat_tab cometchat_tab_tiempo">
            <a href="#">
                <span class="ui-icon ui-icon-person"></span>
                <span><?php echo $this->translate('El tiempo');?></span>
            </a>
        </span>
        
        <span class="cometchat_tab cometchat_tab_idioma">
            <a>
                <span><?php echo $this->idioma;?></span>
            </a>
        </span>

        <span class="cometchat_tab cometchat_tab_salir">
      	    <a href="<?echo $this->baseUrl('login/logout')?>"> 
                <span class="ui-icon ui-icon-power"></span>
                <span><?php echo $this->translate('Salir');?></span>
            </a>
        </span>
        
        
        <?endif?>
   
    </div>


    <div id="pie_pagina"></div>

    <!--Ventanas modales estan hidden por defecto-->
<div class="noprint"> 
    <div id="caja_mis_asuntos" class="caja_footer ui-state-highlight">
      <li>
        <h3><?php echo $this->translate('Tareas Pendientes');?></h3>
     </li>
      <div id="asunt"></div>
      <a class="button_ira" href="/index.php?modulo=Task"><?php echo $this->translate('Gestionar Tareas');?></a>
    </div>

    <div id="caja_favoritos" class="caja_footer">
    	<ul>
   		    <li><a href="/index/favoritos/"><?php echo $this->translate('Favoritos');?></a></li>
    		<li><a href="/index/favoritos/order/recent"><?php echo $this->translate('Recientes');?></a></li>  
            <li><a class="cierra"><img src="<?="http://$server:$port"?>/img/close.png"/></a></li>
            </ul>
    </div>
    <div id="dialog" title="<?php echo $this->translate('Cargando...');?>"></div>		
            
    <div id="dialog-confirm" title="<?php echo $this->translate('¿Seguro que desea Borrar?');?>">
        <p><span class="ui-icon ui-icon-alert"></span><?php echo $this->translate('Este item sera borrado permanentemente y no se podra recuperar. ¿Estas seguro?');?></p>
    </div>
            
    <div id="alertas" title="<?php echo $this->translate('Atención');?>">
        <p><span class="ui-icon ui-icon-alert"></span><span id="msg12345"></span></p>
    </div>
    
    
    <div id="tab_tiempo" class="caja_footer">
    	<ul>
    		<li><a href="/index/tiempo/ciudad/madrid"><?php echo $this->translate('Madrid');?></a></li>
    		<li><a href="/index/tiempo/ciudad/barcelona"><?php echo $this->translate('Barcelona');?></a></li>
    		<li><a href="/index/tiempo/ciudad/sevilla"><?php echo $this->translate('Sevilla');?></a></li>
            <li><a href="/index/tiempo/ciudad/lisboa"><?php echo $this->translate('Lisboa');?></a></li>
            <li><a class="cierra"><img src="<?="http://$server:$port"?>/img/close.png"/></a></li>
    	</ul>
    </div>
    
    
</div>       
<!--Fin ventanas modales-->
</body>     
</html>     
  
  
  